﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using PilotProject.CustomClasses;

namespace PilotProject
{
     //[MetadataType(typeof(TestEngineMeta))]
    public abstract partial class TestEngine
    {


        public abstract void LoadQuestions(TestToken token); 
     


        public TestToken GenerateTestToken(Candidate candidate, Examiner examiner)
        {
            var token = new TestToken { TestEngine = this, Candidate = candidate, Examiner = examiner, NoOfQuestions = NumberOfQuestions, PassmarkAsPercentage = PassmarkAsPercentage, TimeAllowedInMinutes = DurationInMinutes, DateCreated = DateTime.Now };
            token.Id = Guid.NewGuid();
            TestTokens.Add(token);
            return token; 
        }


    }
}
